const mongoose = require("mongoose")
module.exports = new mongoose.Schema(
  {
    username: {
      required: true,
      type: String,
      unique: true,
    },
    password: {
      required: true,
      type: String,
    },
    register_date: {
      type: Date,
      default: Date.now(),
    },
    lastlogin_date: {
      type: Date,
      default: Date.now(),
    },
    token: {
      type: String,
      default: "",
    },
  },
  {
    collection: "admin",
  }
)
